package com.zhou.message.model;

import com.zhou.org.common.EnumConstant;
import com.zhou.org.dao.Org;
import com.zhou.org.dao.User;
import lombok.Data;

@Data
public class MessageReceiver {
    private Integer orgId;
    private Integer orgType;
    private Integer userId;
    private Integer recieveType = EnumConstant.MSG_RECEIVE_TYPE_NORMAL;

    public MessageReceiver() {
    }

    public MessageReceiver(User user) {
        setUserId(user.getUserId());
        setOrgId(user.getOrgId());
        setOrgType(EnumConstant.ORG_TYPE_USER);
    }

    public MessageReceiver(Org o) {
        setUserId(o.getUserId());
        setOrgId(o.getOrgId());
        setOrgType(o.getOrgType());
    }

}
